import request from '@/utils/request'

// 查询网关套餐列表
export function listGatewayPackage(query) {
  return request({
    url: '/admin-api/backstage/gatewayPackage/list',
    method: 'get',
    params: query
  })
}

// 查询网关套餐详细
export function getGatewayPackage(id) {
  return request({
    url: '/admin-api/backstage/gatewayPackage/' + id,
    method: 'get'
  })
}

// 新增网关套餐
export function addGatewayPackage(data) {
  return request({
    url: '/admin-api/backstage/gatewayPackage',
    method: 'post',
    data: data
  })
}

// 修改网关套餐
export function updateGatewayPackage(data) {
  return request({
    url: '/admin-api/backstage/gatewayPackage',
    method: 'put',
    data: data
  })
}

// 删除网关套餐
export function delGatewayPackage(id) {
  return request({
    url: '/admin-api/backstage/gatewayPackage/' + id,
    method: 'delete'
  })
}

// 查询网关套餐列表
export function listGatewayPackageSelect(query) {
  return request({
    url: '/admin-api/backstage/gatewayPackage/list/select',
    method: 'get',
    params: query
  })
}

export function updateStats(data) {
  return request({
    url: '/admin-api/backstage/gatewayPackage/update/status',
    method: 'post',
    data: data
  })
}
